/**
 * inforcreation.com co.Ltd
 * MichaelHuang
 * 2011-12-16
 */
package com.zchat.api.connection;

/**
 * Read status enumrations
 * @author MichaelHuang
 *
 */
public enum ReadStatus {

	online, offline, other;
	
	public static String enumToString (ReadStatus status) {
		if(status == ReadStatus.online) {
			return "online";
		} else if (status == ReadStatus.offline) {
			return "offline";
		}
		return null;
	}
	
	public static ReadStatus stringToEnum(String status) {
		if(status.equals("online")) {
			return ReadStatus.online;
		} else if(status.equals("offline")) {
			return ReadStatus.offline;
		}
		return other;
	}
}
